﻿using Map;
using Microsoft.Xna.Framework;

namespace Map
{
    public class TileStructGrid
    {
        protected TileStruct[,] tiles;

        public virtual TileStruct this[int x, int y]
        {
            get
            {
                return tiles[x, y];
            }
            set { tiles[x, y] = value; }
        }

        public TileStruct this[Point pos]
        {
            get
            {
                return this[pos.X, pos.Y];
            }
            set { this[pos.X, pos.Y] = value; }
        }

        public Point Size;

        public TileStructGrid()
        {
            // just empty so that others can make theyr own initialization
        }

        public TileStructGrid(int x, int y)
        {
            Size = new Point(x, y);
            tiles = new TileStruct[x, y];
        }
    }
}
